package svc

import (
	"api/internal/config"
	"github.com/zeromicro/go-zero/zrpc"
	"mooc_srv/moocclient"
)

type ServiceContext struct {
	Config  config.Config
	MoocSrv moocclient.Mooc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:  c,
		MoocSrv: moocclient.NewMooc(zrpc.MustNewClient(c.MoocSrv)),
	}
}
